//
// CSegRemanenceShape.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CVector;
import org.ryzom.nel.misc.IStream;

public class CSegRemanenceShape {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CSegRemanenceShape(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CSegRemanenceShape obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CSegRemanenceShape(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CSegRemanenceShape() {
    this(nel3dJNI.new_CSegRemanenceShape__SWIG_0(), true);
  }

  public CSegRemanenceShape(CSegRemanenceShape other) {
    this(nel3dJNI.new_CSegRemanenceShape__SWIG_1(CSegRemanenceShape.getCPtr(other), other), true);
  }

  public CSegRemanenceShape assign(CSegRemanenceShape other) {
    return new CSegRemanenceShape(nel3dJNI.CSegRemanenceShape_assign(swigCPtr, this, CSegRemanenceShape.getCPtr(other), other), false);
  }

  public void serial(IStream f) {
    nel3dJNI.CSegRemanenceShape_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public void setMaterial(CMaterial mat) {
    nel3dJNI.CSegRemanenceShape_setMaterial(swigCPtr, this, CMaterial.getCPtr(mat), mat);
  }

  public CMaterial getMaterial() {
    return new CMaterial(nel3dJNI.CSegRemanenceShape_getMaterial(swigCPtr, this), false);
  }

  public void setNumSlices(long numSlices) {
    nel3dJNI.CSegRemanenceShape_setNumSlices(swigCPtr, this, numSlices);
  }

  public long getNumSlices() {
    return nel3dJNI.CSegRemanenceShape_getNumSlices(swigCPtr, this);
  }

  public float getSliceTime() {
    return nel3dJNI.CSegRemanenceShape_getSliceTime(swigCPtr, this);
  }

  public void setSliceTime(float sliceTime) {
    nel3dJNI.CSegRemanenceShape_setSliceTime(swigCPtr, this, sliceTime);
  }

  public void setNumCorners(long numCorners) {
    nel3dJNI.CSegRemanenceShape_setNumCorners(swigCPtr, this, numCorners);
  }

  public long getNumCorners() {
    return nel3dJNI.CSegRemanenceShape_getNumCorners(swigCPtr, this);
  }

  public void setCorner(long corner, CVector value) {
    nel3dJNI.CSegRemanenceShape_setCorner(swigCPtr, this, corner, CVector.getCPtr(value), value);
  }

  public CVector getCorner(long corner) {
    return new CVector(nel3dJNI.CSegRemanenceShape_getCorner(swigCPtr, this, corner), true);
  }

  public void setBBox(SWIGTYPE_p_NLMISC__CAABBox bbox) {
    nel3dJNI.CSegRemanenceShape_setBBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(bbox));
  }

  public void setTextureShifting(boolean on) {
    nel3dJNI.CSegRemanenceShape_setTextureShifting__SWIG_0(swigCPtr, this, on);
  }

  public void setTextureShifting() {
    nel3dJNI.CSegRemanenceShape_setTextureShifting__SWIG_1(swigCPtr, this);
  }

  public boolean getTextureShifting() {
    return nel3dJNI.CSegRemanenceShape_getTextureShifting(swigCPtr, this);
  }

  public void getAABBox(SWIGTYPE_p_NLMISC__CAABBox bbox) {
    nel3dJNI.CSegRemanenceShape_getAABBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(bbox));
  }

  public void setAnimatedMaterial(String name) {
    nel3dJNI.CSegRemanenceShape_setAnimatedMaterial(swigCPtr, this, name);
  }

  public CMaterialBase getAnimatedMaterial() {
    long cPtr = nel3dJNI.CSegRemanenceShape_getAnimatedMaterial(swigCPtr, this);
    return (cPtr == 0) ? null : new CMaterialBase(cPtr, false);
  }

  public void setRollupRatio(float ratio) {
    nel3dJNI.CSegRemanenceShape_setRollupRatio(swigCPtr, this, ratio);
  }

  public float getRollupRatio() {
    return nel3dJNI.CSegRemanenceShape_getRollupRatio(swigCPtr, this);
  }

  public boolean clip(SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t pyramid, SWIGTYPE_p_NLMISC__CMatrix worldMatrix) {
    return nel3dJNI.CSegRemanenceShape_clip(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t.getCPtr(pyramid), SWIGTYPE_p_NLMISC__CMatrix.getCPtr(worldMatrix));
  }

  public CTrackDefaultVector getDefaultPos() {
    long cPtr = nel3dJNI.CSegRemanenceShape_getDefaultPos(swigCPtr, this);
    return (cPtr == 0) ? null : new CTrackDefaultVector(cPtr, false);
  }

  public CTrackDefaultQuat getDefaultRotQuat() {
    long cPtr = nel3dJNI.CSegRemanenceShape_getDefaultRotQuat(swigCPtr, this);
    return (cPtr == 0) ? null : new CTrackDefaultQuat(cPtr, false);
  }

  public CTrackDefaultVector getDefaultScale() {
    long cPtr = nel3dJNI.CSegRemanenceShape_getDefaultScale(swigCPtr, this);
    return (cPtr == 0) ? null : new CTrackDefaultVector(cPtr, false);
  }

}
